<template>
  <a-drawer
    class="custom-drawer"
    :title="detail.caption"
    :visible="visible"
    width="720px"
    placement="right"
    @close="onClose"
  >
    <!-- 载体消息 -->
    <template>
      <div class="company">
        <div class="logo" v-if="detail.logoList && detail.logoList.length">
          <a-carousel>
            <div v-for="(item, index) in detail.logoList" :key="index">
              <img :src="item" />
            </div>
          </a-carousel>
        </div>
        <div class="title">{{ detail.title }}</div>
        <div class="mt12 tag">
          <a-tag color="red" v-if="detail.ifYard == 1">带院子</a-tag>
          <a-tag color="red" v-if="detail.ifDrive == 1">拖挂车可进</a-tag>
          <a-tag color="red" v-if="detail.ifPark == 1">停车场</a-tag>
          <a-tag color="red" v-if="detail.ifDetached == 1">独栋</a-tag>
          <a-tag color="red" v-if="detail.ifTwo == 1">双证</a-tag>
          <a-tag color="red">带院子</a-tag>
        </div>
        <a-row class="mt12">
          <a-col :span="8">
            <div class="item" v-if="detail.area">{{ detail.area }}㎡</div>
            <div class="label">面积</div>
          </a-col>
          <a-col :span="8">
            <div class="item">
              {{ detail.minRent }}~{{ detail.maxRent }}/元/㎡/天
            </div>
            <div class="label">租金</div>
          </a-col>
          <a-col :span="8">
            <div class="item">{{ detail.floorType }}</div>
            <div class="label">楼层（共{{ detail.floor }}层）</div>
          </a-col>
        </a-row>
        <a-row class="info">
          <a-col :span="24"
            ><span class="col-9">地址：</span>{{ detail.address }}</a-col
          >
          <a-col class="mt4" :span="24"
            ><span class="col-9">联系人：</span>{{ detail.linkUser }}</a-col
          >
          <a-col class="mt4" :span="24"
            ><span class="col-9">电话：</span>{{ detail.linkPhone }}</a-col
          >
          <a-col class="mt4" :span="24"
            ><span class="col-9">区域：</span>{{ detail.cityArea }}</a-col
          >
          <a-col class="mt4" :span="24"
            ><span class="col-9">属性：</span>{{ detail.attribute }}</a-col
          >
          <a-col class="mt4" :span="24"
            ><span class="col-9">用途：</span>{{ detail.purpose }}</a-col
          >
          <a-col class="mt4" :span="24"
            ><span class="col-9">发布日期：</span
            >{{ detail.publishTime }}</a-col
          >
        </a-row>
      </div>
      <div class="liaisons">
        <div class="title">联络人信息</div>
        <a-row>
          <a-col :span="24"
            ><span class="col-9">联络人：</span>{{ detail.title }}</a-col
          >
          <a-col class="mt4" :span="24"
            ><span class="col-9">电话：</span>{{ detail.linkUserPhone }}</a-col
          >
        </a-row>
      </div>
      <div class="summary">
        <div class="title">载体简介</div>
        <div class="mt12" v-html="detail.info"></div>
      </div>
    </template>
  </a-drawer>
</template>
<script>
// import { dataSource as ds } from '@/services'
// import { isNull } from "@/utils/util"
export default {
  name: 'drawer',

  data() {
    return {
      visible: false,
      detail: {}
    }
  },
  methods: {
    open(e) {
      this.detail = e
      this.visible = true
    },
    onClose() {
      this.visible = false
    }
  }
}
</script>

<style lang="less" scoped>
.title {
  color: #333;
  font-size: 16px;
  font-weight: bold;
}
.company {
  padding: 20px 0;
  border-bottom: 1px dashed #ececec;
  .name {
    color: #333;
    font-size: 16px;
    font-weight: bold;
  }
  .item {
    color: #f5222d;
    font-size: 16px;
    font-weight: bold;
  }
  /deep/.ant-tag-red {
    color: #f5222d !important;
  }
  .info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ececec;
  }
}
.liaisons {
  padding: 20px 0;
  border-bottom: 1px dashed #ececec;
  .ant-row {
    margin-top: 10px;
  }
}
.summary {
  padding: 20px 0;
  border-bottom: 1px dashed #ececec;
}
</style>
<style scoped>
.ant-carousel >>> .slick-slide {
  text-align: center;
  height: 400px;
  background: #364d79;
  overflow: hidden;
}

.ant-carousel >>> .slick-slide h3 {
  color: #fff;
}
</style>
